var http = require('../../../utils/http.js');
var util = require('../../../utils/util.js');
var unionid = wx.getStorageSync('thisCode');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    brSty:['1','',''],
    imgUrl:http.imgUrl,
    brtext:['全部','充值','消费'],
    allShow:false,
    data:{
      name:'暂无资金明细'
    }
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options){
    var unionid = wx.getStorageSync('thisCode');
    let scrollH = Number(util.nowPhoneWH()[1])-70;
    this.setData({scrollH:scrollH})
    wx.showLoading({title: '加载中...',})
    http._post('Consume/consume_list',{unionid:unionid},res=>{
      let data = res.data;
      if(data.status == 1){
        this.setData({
          recordObj:data.info,
          allShow:true
        })
      }
    },res=>{})
  },
  tabarChangeBtn(e){
    let index = http.dataIndex(e)[0];
    let arr = http.forC(this.data.brSty);
    let data = this.data.data;
    data.name = index == 0?'暂无资金明细':index == 1?'暂无充值记录':'暂无消费记录'
    arr[index] = '1';
    this.setData({brSty:arr,data:data})
  },
  inteBottomFn1(){

  },
  inteBottomFn2(){

  },
  inteBottomFn3(){

  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady(){
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow(){
    wx.hideShareMenu();
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide(){
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload(){
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh(){
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom(){
  
  },

})